<?php namespace xlx;
//启动一个单进程单任务通道(不限时任务)（init在单独进程）
class DbService 
{  
    // //异步等待返回coid 
    public static function start($class_fn,$args=[]){
        $pid = yield \xlx\AChannel::make($actor,$s); 
        \xlx\Process::fork(function()use($pid,$class_fn,$args){ 
            $self = yield \xlx\AChannel::make($actor,$s); 
            yield $actor->send($pid,$self);
            yield \xlx\co($class_fn,$actor,$args);
        });
        return yield $actor->receive();
    } 


    public static function init($actor,$args){
        // $actor->send($args,11111);
        // echo yield $actor->receive();
        // echo "333";
        //stream_socket_server
        //stream_socket_accept
        //$pid = \Supervisor::spawn([child,x4],[]); 
        //\Supervisor::start_child($pid,$args);
    }


}